package com.zhuiYun.project.api.shoppingcart.service;

import com.zhuiYun.project.api.shoppingcart.entity.ShoppingCartEntity;
import com.zhuiYun.project.common.response.CommonResult;
import com.zhuiYun.project.api.shoppingcart.model.ShoppingCartModel;
import com.zhuiYun.project.common.errorCode.CommonException;

import java.util.List;
/**
 * @ClassName: ShoppingCartService
 * @descriptions: 购物车Service
 * @Author: zq
 * @Date 2023/4/5 21:02
 */
public interface ShoppingCartService {

    /**
     * @Author 赵笛
     * @Description TODO 商品加入购物车
     * @Date 2023/4/6 20:06
     * @Return
     * @param shoppingCartModel
     */
    CommonResult saveShoppingCart(ShoppingCartModel shoppingCartModel) throws CommonException ;

    /**
     * @description: 用户查询购物车信息
     * @author: zq
     * @date: 2023/4/6 11:00
     * @param: [userId]
     * @return: com.zhuiYun.project.common.response.CommonResult
    **/
    CommonResult shoppingCartByUserId(Integer userId) throws CommonException;

    /**
     * @description: 用户查询购物车商品数量
     * @author: zq
     * @date: 2023/4/6 20:09
     * @param: [userId]
     * @return: com.zhuiYun.project.common.response.CommonResult
    **/
    CommonResult shoppingCartCountByUserId(Integer userId) throws CommonException;

    /**
     * @description: 用户修改购物车商品数量方法
     * @author: zq
     * @date: 2023/4/7 8:39
     * @param: [shoppingCartModel]
     * @return: com.zhuiYun.project.common.response.CommonResult
    **/
    CommonResult changeNum(ShoppingCartModel shoppingCartModel) throws CommonException ;

    /**
     * @description: 用户删除购物车商品方法
     * @author: zq
     * @date: 2023/4/7 9:02
     * @param: [id]
     * @return: com.zhuiYun.project.common.response.CommonResult
    **/
    CommonResult delShoppingCartByUserId(Integer id) throws CommonException;

    /**
     * @description: 用户删除选中购物车商品方法
     * @author: zq
     * @date: 2023/4/7 9:23
     * @param: [id]
     * @return: com.zhuiYun.project.common.response.CommonResult
    **/
    CommonResult delShoppingCart(List<Integer> ListId) throws CommonException;

    /**
     * @description: 修改选中框状态为false
     * @author: zq
     * @date: 2023/4/9 18:43
     * @param: [listId]
     * @return: com.zhuiYun.project.common.response.CommonResult
    **/
    CommonResult wholeCheck(List<Integer> listId) throws CommonException;

    /**
     * @description: 修改选中框状态为true
     * @author: zq
     * @date: 2023/4/9 19:22
     * @param: [listId]
     * @return: com.zhuiYun.project.common.response.CommonResult
    **/
    CommonResult wholeChecks(List<Integer> listId) throws CommonException;

    /**
     * @description: 修改单选框状态为false
     * @author: zq
     * @date: 2023/4/10 15:36
     * @param: [id]
     * @return: com.zhuiYun.project.common.response.CommonResult
    **/
    CommonResult checkboxById(Integer id) throws CommonException;

    /**
     * @description:  修改单选框状态为true
     * @author: zq
     * @date: 2023/4/10 15:39
     * @param: [id]
     * @return: com.zhuiYun.project.common.response.CommonResult
    **/
    CommonResult checkboxByIds(Integer id) throws CommonException;
}
